Optimal. Leaf size=554 \[ \frac {i (a+b \text {ArcTan}(c x))^2}{c e}+\frac {x (a+b \text {ArcTan}(c x))^2}{e}+\frac {2 b (a+b \text {ArcTan}(c x)) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} (a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} (a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b^2 \text {PolyLog}\left (2,1-\frac {2}{1+i c x}\right )}{c e}-\frac {i b \sqrt {-d} (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} (a+b \text {ArcTan}(c x)) \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {PolyLog}\left (3,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.36, antiderivative size = 554, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 8, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {5036, 4930,
5040, 4964, 2449, 2352, 5034, 4968} \begin {gather*} -\frac {i b \sqrt {-d} (a+b \text {ArcTan}(c x)) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} (a+b \text {ArcTan}(c x)) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {\sqrt {-d} (a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} (a+b \text {ArcTan}(c x))^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 e^{3/2}}+\frac {x (a+b \text {ArcTan}(c x))^2}{e}+\frac {i (a+b \text {ArcTan}(c x))^2}{c e}+\frac {2 b \log \left (\frac {2}{1+i c x}\right ) (a+b \text {ArcTan}(c x))}{c e}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}+\frac {i b^2 \text {Li}_2\left (1-\frac {2}{i c x+1}\right )}{c e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2352
Rule 2449
Rule 4930
Rule 4964
Rule 4968
Rule 5034
Rule 5036
Rule 5040
Rubi steps
\begin {align*} \int \frac {x^2 \left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx &=\frac {\int \left (a+b \tan ^{-1}(c x)\right )^2 \, dx}{e}-\frac {d \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{d+e x^2} \, dx}{e}\\ &=\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}-\frac {(2 b c) \int \frac {x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{e}-\frac {d \int \left (\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt {-d}-\sqrt {e} x\right )}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2}{2 d \left (\sqrt {-d}+\sqrt {e} x\right )}\right ) \, dx}{e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {(2 b) \int \frac {a+b \tan ^{-1}(c x)}{i-c x} \, dx}{e}-\frac {\sqrt {-d} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}-\sqrt {e} x} \, dx}{2 e}-\frac {\sqrt {-d} \int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {\left (2 b^2\right ) \int \frac {\log \left (\frac {2}{1+i c x}\right )}{1+c^2 x^2} \, dx}{e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}+\frac {\left (2 i b^2\right ) \text {Subst}\left (\int \frac {\log (2 x)}{1-2 x} \, dx,x,\frac {1}{1+i c x}\right )}{c e}\\ &=\frac {i \left (a+b \tan ^{-1}(c x)\right )^2}{c e}+\frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{e}+\frac {2 b \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2}{1+i c x}\right )}{c e}+\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}-\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )^2 \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b^2 \text {Li}_2\left (1-\frac {2}{1+i c x}\right )}{c e}-\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {i b \sqrt {-d} \left (a+b \tan ^{-1}(c x)\right ) \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 e^{3/2}}+\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}-\frac {b^2 \sqrt {-d} \text {Li}_3\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 e^{3/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [F]
time = 180.00, size = 0, normalized size = 0.00 \begin {gather*} \text {\$Aborted} \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 73.26, size = 94172, normalized size = 169.99
method | result | size |
derivativedivides | \(\text {Expression too large to display}\) | \(94172\) |
default | \(\text {Expression too large to display}\) | \(94172\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x^{2} \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{d + e x^{2}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x^2\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{e\,x^2+d} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________